
import {Controller,Post,Body,Get,Query} from "@nestjs/common"
import {StaffService} from './staff.service'

@Controller("staff")

export class StaffController {
    constructor (
        private staffService:StaffService
    ){
        
    }

    // 获取员工数据
    @Get("getStaffData")
    getSatffData(@Query() body){
        // console.log(body)
        // return{
        //     code:200
        // }
        return this.staffService.getStaff(body)
    }

    // 获取权限
    @Get("getPower")
    getPower(){
      return  this.staffService.getPower()
    }

    // 根据自己的员工Id获取自己组的员工
    @Get("getOwnTeamMember")
    getOwnMember(@Query() que){
        // console.log
      return  this.staffService.getOwnTeam(que)
    }
}
